package ConnectionsCommands;

import Gear.Factory;

import java.net.Socket;

/**
 * Implement received command to inform that a peer is alive.
 *
 * @author Rodrigo Martins Racanicci
 */
public class ConnectionCommandIAA implements ConnectionCommand {

    @Override
    public void execute(Socket client, String[] args) {
        synchronized (this) {
            Factory.getInstance().getTracker().addPeer(client.getInetAddress().toString());
        }
    }

}
